1. Field of the Invention
The present invention relates to a technique for detecting a movement of an object by using image processing, and a technical field of a recording apparatus.
2. Description of the Related Art
When printing is performed while a medium such as a print sheet is being conveyed, if conveyance accuracy is low, density unevenness of a halftone image or a magnification error may be generated, thereby deteriorating quality of acquired print images.
Therefore, although high-performance components are adopted and an accurate conveyance mechanism is mounted, requests about print qualities are demanding, and further enhancement of accuracy is requested. In addition, requests about costs are also demanding. Both of high accuracy and low costs are requested.
To address these issues, and thus, to detect a movement of a medium with high accuracy and perform stable conveyance by a feedback control, it has been attempted to capture the image of a surface of the medium and detect the movement of the medium that is being conveyed by image processing.
Japanese Patent Application Laid-Open No. 2007-217176 discusses a method for detecting the movement of the medium. According to Japanese Patent Application Laid-Open No. 2007-217176, an image sensor captures images of a surface of a moving medium several times in time series, the acquired images are compared with each other by performing pattern matching processing, and thus an amount of the movement of the medium can be detected. Hereinafter, a method in which a movement state is detected by directly detecting the surface of the object is referred to as “direct sensing”, and a detector using this method is referred to as a “direct sensor”.
When the direct sensing is used to detect the movement, the surface of the medium needs to be optically, sufficiently identified and unique patterns need to be obvious. However an applicant of the present exemplary embodiment has found that, under conditions described below, accuracy of pattern matching can be deteriorated.
When a template pattern in a first image (reference image) to be clipped is located at a fixed position, following problems may arise.
(1) FIGS. 12A, 12B, 12C, and 12D, illustrate an example where a movement of a conveyance belt on which a number of markers randomly carved is detected. As illustrated in FIG. 12A, when the template pattern of the first image includes a number of characteristic markers, the same images can be easily identified by using pattern matching in a second image.
However, as illustrated in FIG. 12B, when the template pattern includes only one marker and most part thereof is unpatterned, a part including another marker can be erroneously detected in the second image.
This phenomenon can often occur when a carving density of the markers is low and the markers are sparsely carved, or when the image has a flaw larger than the marker. Further, when the image of the surface of the medium, not the conveyance belt, is captured, a similar phenomenon can often occur.
(2) When the image of the surface of the medium having a rough and uneven surface is captured, uneven illuminance may be generated in apart of an illuminated region due to the rough, uneven surface, or illumination light may cause specular reflection due to the rough, uneven surface, and thereby contrast of the captured image may be decreased. Thus, the surface of the medium may not be appropriately used as the template pattern.
Further, due to changes across the ages of a light source or the image sensor, uneven illuminance is generated in the illumination region or photoelectric conversion is not normally performed in a part of a region of the sensor. In these cases, the accuracy of the pattern matching may be also deteriorated.
(3) As illustrated in FIG. 12C, if the template pattern includes dust placed on the image sensor, even when an object moves, an image of the dust does not move on the image of the object. Thus, the dust can cause deterioration of the accuracy of the pattern matching.
(4) When the image is formed on the image sensor using a lens, as illustrated in FIG. 12D, due to influence of distortion of the image caused by optical characteristics of the lens, the marker in the template pattern can be distorted. The image is particularly distorted when a refractive index distribution lens is used, thereby causing the deterioration of the accuracy of the pattern matching.